package com.travel.admin.config;

import javax.servlet.DispatcherType;

import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class FilterConfig {
	@Bean
    public FilterRegistrationBean<HttpStreamFilter> streamFilterRegistration() {
        FilterRegistrationBean<HttpStreamFilter> registration = new FilterRegistrationBean<HttpStreamFilter>();
        registration.setDispatcherTypes(DispatcherType.REQUEST);
        registration.setFilter(new HttpStreamFilter());
        registration.addUrlPatterns("/*");
        registration.setName("HttpStreamFilter");
        registration.setOrder(3);
        return registration;
    }
}
